#ifndef __UTILS_H__
#define __UTILS_H__
#include <iostream>
#include <ctime>
using namespace std;
enum ReturnStatus { SUCCESS, FAILURE };
enum Operation { OPLOGIN, OPREGISTER ,OPMANAGER,OPUSER};
enum Role { ROLEADMIN, ROLEUSER };
enum TableChoice { TABLEUSER, TABLEDEVICE,TABLELOG};
#define LOGSUCCESS "登录成功"
#define LOGFAILURE "登录失败"
#define REGSUCCESS "注册成功"
#define REGFAILURE "注册失败"
#define DEVICEADDSUCCESS "添加成功"
#define DEVICEADDFAILURE "添加失败"
#define DEVICEDELETESUCCESS "删除成功"
#define DEVICEDELETEFAILURE "删除失败"
#define GET_CURRENT_TIME() \
    ({ \
        time_t currentTime = time(nullptr); \
        char* timeString = ctime(&currentTime); \
        string result(timeString); \
        result; \
    })
#endif